<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>ServerConsole</title>

    <script type="text/javascript">
         window.onload = function () {
             document.getElementById('city').addEventListener('change',function(){
                 alert("当前选项是:"+this.value);
             },false);
         }
     </script>

</head>
<body>
    <form action="">
         请选择城市:
         <select id = "city">
             <option value="BJ - 北京">北京</option>
             <option value="SH - 上海">上海</option>
             <option value="NJ - 南京">南京</option>
             <option value="TJ - 天津">天津</option>
             <option value="HF - 合肥">合肥</option>
             <option value="WH - 武汉">武汉</option>
         </select>
     </form>

    <textarea style="overflow:scroll; overflow-x:hidden; height:50px;"></textarea>
</body>
</html>